home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TeX 1995 July
/
TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO
/
tex-k
/
tex-k-archive.past
/
tex-k-archive.gz
/
tex-k-archive
/
000048_fj@iesd.auc.dk_Tue Oct 12 17:48:04 1993.msg
< prev
next >
Wrap
Internet Message Format
|
1994-10-11
|
2KB
Received: from iesd.auc.dk by cs.umb.edu with SMTP id AA04572
(5.65c/IDA-1.4.4 for <tex-k@cs.umb.edu>); Tue, 12 Oct 1993 11:48:38 -0400
Received: from loke.iesd.auc.dk by iesd.auc.dk with SMTP id AA25765
(5.65c8/IDA-1.5/MD for <tex-k@cs.umb.edu>); Tue, 12 Oct 1993 16:46:52 +0100
Received: by loke.iesd.auc.dk id AA18012
(5.65c8/IDA-CLIENT/MD); Tue, 12 Oct 1993 16:48:04 +0100
Date: Tue, 12 Oct 1993 16:48:04 +0100
From: Frank Jensen <fj@iesd.auc.dk>
Message-Id: <199310121548.AA18012@loke.iesd.auc.dk>
To: tim@maths.tcd.ie
Cc: tex-k@cs.umb.edu
In-Reply-To: <9310121604.aa24885@salmon.maths.tcd.ie> (message from Timothy Murphy on Tue, 12 Oct 1993 16:04:19 (BST))
Subject: Re: Speed of (recursive) search in the Kpathsearch library
> > I'm sure most people have noticed the delay due to the recursive
> > search of subdirectories when TeX starts up.
>
> While your scheme seems a good idea to me,
> it may be worth noting that Karl's subdirectory search algorithm
> works best if each subdirectory in or below the search path
> _either_ contains only subdirectories
> _or_ contains only files.
>
> The first step in Karl's recursive algorithm
> is to determine if the directory being examined
> contains any subdirectories.
> If it does, every file or subdirectory is "stat"ed,
> which can take a non-negligible time,
> particularly on a remote computer.
Actually, there are two steps in the file location procedure. The
first is a `set-up' step: we have to locate the possible target
directories to use when searching for files. This is, as you note, a
recursive procedure that is most efficient if each directory contains
either subdirectories or files. The output of this step is a list of
(sub)directories.
The second step is where the actual file search takes place: we simply
try to open the file in each directory on the previously produced list
until we get a `hit'.
As you note, the time spent in the first step is very large if we do
not carefully organize the directory hierarchy such that ordinary
files are in leaf-directories only. However, in my set-up, there are
currently 75 directories, and only a few ordinary files (typically
READMEs) have slipt into non-leaf directories. When the list of
directories gets this large, the second step also begins to be
noticable.
/Frank